import request from '@/utils/request'

// 分页查询文章记录
export const getWrittenArticle = (params) => {
  return request({
    url: '/v1/departmentWork/article/',
    method: 'get',
    params
  })
}

// 查询组员下的文章记录
export const queryGroupArticle = (params) => {
  return request({
    url: '/v1/departmentWork/article/groupExamine/',
    method: 'get',
    params
  })
}

// 审核文章
export const examineGroupArticle = (data) => {
  return request({
    url: '/v1/departmentWork/article/groupExamine/',
    method: 'put',
    data
  })
}

// 查询文章以评级
export const queryLevelArticle = (params) => {
  return request({
    url: '/v1/departmentWork/article/levelExamine/',
    method: 'get',
    params
  })
}

// 评级文章
export const evaluateArticle = (data) => {
  return request({
    url: '/v1/departmentWork/article/levelExamine/',
    method: 'put',
    data
  })
}


// 创建文章撰写记录
export const addWrittenArticle = (data) => {
  return request({
    url: '/v1/departmentWork/article/my/',
    method: 'post',
    data
  })
}

// 个人查询文章撰写记录
export const getMyWrittenArticle = (params) => {
  return request({
    url: '/v1/departmentWork/article/my/',
    method: 'get',
    params
  })
}

// 删除记录
export const delMyWrittenArticle = (data) => {
  return request({
    url: '/v1/departmentWork/article/my/',
    method: 'delete',
    data
  })
}

// 统计
export const getArticleStatistics = (params) => {
  return request({
    url: '/v1/departmentWork/article/statistics/',
    method: 'get',
    params
  })
}

// 按月统计
export const sArticleMontyly = (params) => {
  return request({
    url: '/v1/departmentWork/article/statisticsMonthly/',
    method: 'get',
    params,
  })
}
